package com.example.canteen.service.impl;

import com.example.canteen.domain.InventoryAdjustments;
import com.example.canteen.service.InventoryAdjustmentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InventoryAdjustmentsServiceImpl implements InventoryAdjustmentsService {
    @Autowired
    private com.example.canteen.mapper.InventoryAdjustmentsMapper InventoryAdjustmentsMapper;



    @Override
    public List<InventoryAdjustments> selectAllInventoryAdjustments() {
        return InventoryAdjustmentsMapper.getAll();
    }

    @Override
    public boolean selectInventoryAdjustmentsById(int AdjustmentID) {
        return InventoryAdjustmentsMapper.selectById(AdjustmentID) != null;
    }

    @Override
    public int insertInventoryAdjustments(InventoryAdjustments inventoryadjustments) {
        return com.example.canteen.mapper.InventoryAdjustmentsMapper.insertInventoryAdjustments((InventoryAdjustments) inventoryadjustments);
    }

    @Override
    public int updateInventoryAdjustments(InventoryAdjustments inventoryadjustments) {
        return com.example.canteen.mapper.InventoryAdjustmentsMapper.updateInventoryAdjustments((InventoryAdjustments)inventoryadjustments);
    }

}